package com.yesep.learn.design.behavioral.interpreter.calculator;

public class OperatorExpression implements IExpression {
    private final String operator;

    public OperatorExpression(String operator) {
        this.operator = operator;
    }

    @Override
    public double interpret(Context context) {
        return operator.hashCode(); // 返回一个唯一值，以便区分操作符
    }
}